Skip to content

Documented the pin and save limits, the missing message operations, and call transcriptions. - #517

Merged
ranjanravi85 merged 10 commits into
mainfrom
docs/restapi-chatapi-ENG-39107
Sep 18, 2026
Merged

ranjanravi85 merged 10 commits into
mainfrom
docs/restapi-chatapi-ENG-39107

Conversation

@pranavkamble-cometchat

@pranavkamble-cometchat pranavkamble-cometchat commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

…verview.

Description

Related Issue(s)

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

Additional Information

Screenshots (if applicable)

@mintlify

mintlify Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cometchat 🟢 Ready View Preview Sep 18, 2026, 1:58 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

siva-cometchat
siva-cometchat previously approved these changes Sep 10, 2026
…rows, rename example UIDs to cometchat-uid-N
siva-cometchat
siva-cometchat previously approved these changes Sep 10, 2026
States all four limits as fixed values wherever a reader looks: 100 pinned
messages per conversation with user and app pins sharing that limit, 100 saved
messages per user, 5 pinned conversations per user, and 5 globally pinned
conversations per app.

- rest-api/messages.mdx: correct the pin bullet, which said a conversation
  holds 100 pinned messages and then that app and user pins each have their
  own limit of 100, implying 200. Adds the error codes to the limit bullets
  and to the page's error table. Operations table: rename the row to
  "Mark Message As Interacted" to match the page title, reword "Remove a
  pinned message" to "Unpin a message", and note the five operations that
  require the onBehalfOf header.
- rest-api/conversations.mdx: add the two conversation pin limits.
- articles/properties-and-constraints.mdx: add all four as rows, which the
  messages page already linked to for system limits.
- articles/error-guide.mdx: give the four limit errors their actual values
  instead of "the maximum number allowed".
- Re-sync chat-apis.json and data-import-apis.json from the chat-api OAS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds a Get Call Transcriptions page driven by the new
/calls/{sessionId}/transcriptions operation, wires it into the Calls group in
docs.json, and refreshes calls.json from the regenerated OAS output.

The overview gains the endpoint row, the hasTranscription and transcriptions
call properties, and a Transcription Properties table. List Calls gains the
hasTranscription=true filter use case and the updated description.

Also documents behaviour that was already live but undocumented: calls flagged
with hasTranscription embed their 5 newest transcripts directly in the List
Calls and Get Call responses, so the paginated endpoint is only needed beyond
that cap.

Verified against a local mint dev preview -- all four pages render and the
transcriptions array resolves through transcriptionSchema.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…s (ENG-36224)

Refreshes calls.json from the regenerated OAS output. The List Calls and Get
Call examples now set hasTranscription to true and carry the transcriptions
array it gates, which the schema described but no payload demonstrated.

Verified against a local mint dev preview. Note that mint reads the OpenAPI
spec at boot, so a restart is required for calls.json changes to appear.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pranavkamble-cometchat

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review. Responses to the transcriptions points:

P1 — response shape vs ENG-36224

The docs are correct; the ticket's spec is superseded. The shipped endpoint returns transcript artifacts (roomName, mid, tid, startTime, endTime, transcriptDate, transcriptUrl) paginated over files, not the status/language/segment shape described in the ticket. The caller fetches content via transcriptUrl. The asynchronous empty-data case is real behaviour, not a doc gap.

I've recorded this on ENG-36224 so the ticket's acceptance criteria aren't later used as a regression baseline.

Worth noting for future reviews: chat-api only proxies this endpoint — CallCore::transcriptions() forwards via doRequest() to {sessionId}/transcriptions. The response shape is owned by the calls service, so nothing in chat-api can confirm or change it.

P1 — "5 most recent transcriptions"

The claim does have a source: OAS/version/v3/call/schemas/callSchema.php:101, on the callSchema.transcriptions property description. It generates into calls.json.

The reason it isn't findable from this PR: on main and on this branch's HEAD, callSchema.transcriptions is absent from calls.json entirely. That file is a stale copy predating the transcriptions work, because clac (the calls-spec generator) was silently emitting a spec with zero paths — Config::loadCallsSortOrder() was never called, so $CALLS_SORT_ORDER was loaded with the admin sort order and every call path was filtered out. That generator bug is fixed on the chat-api side, and a regenerated calls.json carries the property and its description.

So the open question is narrower than "unsourced claim" — it's "is 5 still the right number", and that's owned by the calls service.

P2 — upstream spec annotations

Agreed on the risk, and the fix already exists — it just isn't merged. origin/dev has 304 superhero references in its annotations (and 283 in its generated spec) and hasn't moved since 10 Sep. The updated annotations are on chat-api ENG-38785 (commit 27c6de162), which is 6 commits ahead of dev.

So the action is to merge that branch before anyone regenerates, rather than re-applying the edits here.

Accepted and actioned

  • Removing the pin overshoot/lock paragraph — agreed, it's an internal detail. It exists in two places: rest-api/messages/pin-message.mdx:8 and chat-api OAS/version/v3/admin/sort_order.php:181. Removing only the first would let it return on the next regeneration.
  • get-call.mdx — confirmed 0 mentions of transcriptions vs 2 in list-calls.mdx; will update description and intro.
  • onBehalfOf on get-call-transcriptions.mdx — the spec already declares it (onBehalfOf, sessionId, page, perPage); the page will say so.
  • Scope — noted; will either split the transcriptions work or retitle.

Separately

The backend change to a single shared pin count is tracked apart from this PR. It's a behaviour change rather than a default bump: getPinnedMessagesCount() and getPinnedCountCacheKey() both take a $system flag and the limit splits at MessageCore.php:12037-12040, so the counters have to stop splitting on $isSystemPin. The docs already state the shared-limit behaviour.

…pages.

From the review on #517:

- Removed the pin overshoot/lock paragraph from Pin Message.
- Added the per-user and global pinned-conversation limits to their own
  endpoint pages. They were stated only in the OAS operation description,
  which each page's frontmatter description overrides, so they rendered
  nowhere on the site.
- Added the "5 most recent transcriptions" cap to List Calls and Get Call
  for the same reason, and noted onBehalfOf on Get Call Transcriptions.
- Synced calls.json and chat-apis.json from chat-api.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pranavkamble-cometchat pranavkamble-cometchat changed the title Added pin and save limits and the missing message operations to the o… Documented the pin and save limits, the missing message operations, and call transcriptions. Sep 18, 2026
@pranavkamble-cometchat

Copy link
Copy Markdown
Contributor Author

Follow-up to my previous comment — correcting one point and closing two others. All of this is now pushed in 594d09bb.

Scope — retitled, not split

I said I would "either split the transcriptions work or retitle." Correcting that: the transcriptions changes are intentional and belong in this PR. I've retitled it rather than splitting, so no separate PR is coming — please review them as part of this one.

"5 most recent" — confirmed

Confirmed against the calls service: it returns at most the 5 most recent transcriptions per call. That number is no longer an unsourced claim, and it's now stated on the pages themselves rather than only on the schema property.

Why the limits moved into the page bodies

Worth flagging, because it changes how any limit has to be documented here: a page's frontmatter description: overrides the OAS operation description, and all 43 rest-api/messages and rest-api/conversations pages set one.

So the limits I had written into the OAS descriptions rendered nowhere on the site. Reading the source would not have shown this — I only caught it by running the docs locally and checking the rendered pages. Now stated in the page bodies:

Page Limit now shown
Pin Message 100 pinned messages per conversation, shared between user and app pins
Save Message 100 saved messages per user
Pin User / Pin Group Conversation 5 pinned conversations per user
Replace Global Pinned Conversations 5 global pins per app
List Calls / Get Call 5 most recent transcriptions

Each was verified in a local mint dev render, not just in the source.

Also in this push

  • Removed the pin overshoot/lock paragraph, from the page and the upstream annotation so it cannot return on regeneration.
  • get-call.mdx now covers transcriptions, and onBehalfOf is documented on Get Call Transcriptions.
  • Replaced sivamathewstestgroup — a personal test-group name that was shipping in the public List Calls example — with cometchat-guid-1.

Note on link validation

The "all links valid" checklist item is unchecked because mint broken-links cannot complete on this repo at all: sdk/react-native/authentication-overview.mdx fails to parse (MDX reads Promise<CometChat.User | null> as a JSX tag), which aborts the run. That is pre-existing on main (commit 7e299119) and unrelated to this PR, but it means link regressions are undetectable repo-wide until it's fixed.

Two things still open

  1. Depends on cometchat-team/chat-api#2578. origin/dev still carries 304 superhero references in its annotations and 283 in its generated spec, unchanged since 10 Sep. Until that PR merges, anyone regenerating the specs reintroduces them and undoes the corrections here.
  2. The docs lead the backend on the pin limit. These pages state 100 pinned messages shared between user and app pins, while MessageCore.php still defaults to 5 and splits the counter on $isSystemPin. The divergence is deliberate and tracked separately — flagging it so it isn't read as a documentation error.

Picks up hideParticipants, hideRecording and hideTranscription on List
Calls and Get Call, and the corrected "was not set to true" wording on
the transcriptions property. Generated from chat-api; additive only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pranavkamble-cometchat

Copy link
Copy Markdown
Contributor Author

P2 hideTranscription — fixed upstream, parameter added

Good catch, and the answer was "add it", not "drop the clause". I checked the calls service rather than guessing: hideTranscription is real and the clause was describing actual behaviour.

In cometchat-calls-api, requestFormatter.js reads it for both routes — formatGetCallLogs (line 246) and formatGetCallLogsForSessionId (line 262) — and CallsService.js:20 gates attachTranscriptions on it. So the clause was accurate; the spec just never declared the parameter.

It also turned out to have two siblings read on the same lines, hideParticipants and hideRecording, equally undocumented. I've declared all three on List Calls and Get Call rather than fixing one of three and leaving the same gap — say the word if you'd rather I trim it to just hideTranscription.

One correction to the clause itself. It said the array is present when hideTranscription "was not passed". The service compares against the literal string (options?.hideTranscription == "true"), so hideTranscription=false still returns the array — "was not passed" read as though any value suppressed it. Now reads "was not set to true", and each parameter description says only the exact value true omits the array.

Done upstream in the annotations as you asked (cometchat-team/chat-api@e9cdbc9df), then regenerated. The spec change is purely additive — 48 lines added, zero removed — and I verified all three parameters render on both pages in a local mint dev.

Synced here in d0062737.

On the other two

  • Merge order — agreed, and that constraint is now firmer: cometchat-team/chat-api#2578 carries this hideTranscription fix too, so regenerating before it merges would undo this along with the ID renames.
  • Pin limit gap — understood, tracked, roughly a week out. The pages already describe the target behaviour.

On the MDX parse error

Thanks for pinning down the actual cause — the | breaking the table cell is the part I had missed; I'd only got as far as the JSX-tag symptom. Your sweep of the other 37 pages from 7e299119 is the better-scoped fix, so I'll drop the narrower task I'd raised in favour of it.

@ketanyekale ketanyekale left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Checked: pin/save limits consistent across all pages (shared 100 pins/conversation, 100 saves/user, 5/5 conversation pins); call-transcriptions docs, the 5-most-recent cap, and the new hide* params match the calls service (requestFormatter.js:246/262, CallsService.js:20). 0 broken nav refs, 0 404s, 0 broken internal links; all JSON parses.

Before merging or regenerating specs:

  • Don't regenerate chat-apis.json/calls.json until cometchat-team/chat-api#2578 merges, or these fixes get overwritten.
  • The docs describe the shared pin limit ahead of the backend fix (about a week out). That gap is accepted.
  • The branch is 26 commits behind main; a rebase before merge would be tidy.

@jitvarpatil jitvarpatil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: pin/save limits, missing message operations, call transcriptions

Requesting changes for one content issue — the limits are documented as fixed values when they appear to be configurable defaults. Structurally the PR is clean.

🟠 Limits are stated as fixed, but they appear to be tenant-overridable defaults

The PR documents 100 pinned messages per conversation, 100 saved messages per user, 5 pinned conversations per user, and 5 global pins per app as hard limits ("its limit of 100…") — in articles/error-guide.mdx, articles/properties-and-constraints.mdx, rest-api/messages.mdx, rest-api/conversations.mdx, the four endpoint pages, and the chat-apis.json operation descriptions.

The pin/save front-end design describes the message caps as server settings with a default of 100, overridable per app (SAVED_MESSAGES_PER_USER, PINNED_MESSAGES_PER_CONVERSATION), which is why the UI Kits read the actual cap from errorParams.limit rather than hard-coding the number. If that still holds, the docs are wrong for any app whose limit was changed.

Please confirm with the backend team, then either:

  • word them as defaults — e.g. "By default, a conversation can hold up to 100 pinned messages" — and note that the error response carries the app's actual limit in errorParams; or
  • if they really are fixed, say so explicitly.

Please confirm the 5 pinned conversations and 5 global pins figures in the same pass — I couldn't verify those from any source available to me.

Keep the wording in sync across all the places listed above, including the spec descriptions.

Nits

  • PR description is the unfilled template (empty description; "All links in my changes are valid" and "accurately described" unchecked). The title covers it, but please fill it in.
  • Unrelated edits — "summarise" → "summarize" (ai-agents/vercel-product-hunt-agent.mdx) and the .mintlify/Assistant.md sample-user update. Harmless, just out of scope.

✅ Verified

  • chat-apis.json, calls.json, data-import-apis.json all parse. chat-apis.json has 172 operations before and after with no removal, rename or summary change, so no existing reference page's openapi: ref moves. calls.json adds only GET /calls/{sessionId}/transcriptions.
  • Every openapi: ref in the repo resolves, apart from 29 ai-agents/apis/* pages that are already unresolved on main and untouched here (separate cleanup).
  • rest-api/calls-apis/get-call-transcriptions is in the nav and resolves; page / perPage ("Defaults to 100, capped at 1000"), the optional onBehalfOf header and the server URL match the page. The example sessionId is the one get-call.mdx already uses on main.
  • All eight new rows in the messages operations table (Pin, Unpin, Save, Unsave, Mark As Interacted, List Threads, Subscribe, Unsubscribe) link to existing pages in the nav, and each page's openapi: endpoint matches its row.
  • The superhero* → cometchat-uid-* / cometchat-guid-1 rename is complete — no superhero occurrences remain in any .mdx or .json file.
  • Get Call gains hideParticipants / hideRecording / hideTranscription in the spec.

@ranjanravi85
ranjanravi85 merged commit 102307c into main Sep 18, 2026
5 checks passed
@jitvarpatil

Copy link
Copy Markdown
Contributor

Two more findings on the limits, from the published SDK

Carried over from #536, where @suraj-chauhan-cometchat's parity pass surfaced these. I verified each against the published @cometchat/chat-sdk-react-native@4.1.0 bundle (CometChat.d.ts) rather than a branch. Both bear directly on the limits this PR documents, and they reinforce the request-changes above.

1. User pins and app/system pins are separate budgets, not a shared one

rest-api/messages.mdx and the POST /messages/{id}/pin spec description both say:

Pins made on behalf of a user and pins made as the app (without onBehalfOf) share this limit.

The SDK says the opposite (CometChat.d.ts:1767-1781):

/** Max pinned messages a user may hold in one conversation, or null if the
    app settings carry no quota. */
export function getPinMessageLimit(): Promise<number | null>;

/** Max admin/global pinned messages in one conversation. A separate budget
    from getPinMessageLimit() — system pins do not consume a user's allowance. */
export function getSystemPinMessageLimit(): Promise<number | null>;

The same split exists at conversation level — getPinConversationLimit() vs its system counterpart, "same as the message-level split" (:1796-1801). So there are two quotas per scope, and articles/error-guide.mdx needs the same correction.

2. The quotas are app-settings-driven and may be absent entirely

Every getter returns number | null, and the doc comment is explicit: "or null if the app settings carry no quota". That is independent confirmation of the main point in my review — the caps are configuration, not constants — so 100 / 100 / 5 / 5 should read as defaults, with the app's real value coming from the error response or the app settings. The React Native UI Kit already relies on this: resolveCapLimit (PinSaveHelper.ts) reads errorParams.limit first, falls back to the cached app settings, and returns null when neither has a figure — deliberately, so the toast shows copy without a number rather than printing a guess.

3. ERR_SYSTEM_PINNED_CONVERSATION does not exist in the SDK

It appears in articles/error-guide.mdx but has zero occurrences anywhere in the published SDK bundle. Worth confirming with the backend team whether the server still emits it before it stays in the error reference. (Also, ERR_PERMISSION_DENIED appears only in the compiled JS, not the type definitions, and the pinMessage JSDoc at CometChat.d.ts:1682 still cites the older ERR_ACTION_NOT_ALLOWED — an SDK-side cleanup, not a docs one.)

Separately: I probed the routes this PR documents against us, in and eu — POST /messages/{id}/pin, /save, POST /users/{uid}/conversation/pin, PUT /conversations/pinned, GET /threads, POST /messages/{id}/thread/subscription and GET /calls/{sessionId}/transcriptions are all routed in all three regions now (they reach app-id validation rather than ERR_API_NOT_FOUND). That clears the earlier concern that pin/save were undeployed on the in cluster; it does not verify the cap values, which still need a real app.

This branch was successfully deployed

1 active deployment
staging — d0062737 Deployed Sep 18, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants